package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.CardGrantEntity;
import com.dragon.modules.yuegou.enums.wallet.CardGrantCheckStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 悦卡发放记录（企业向会员发放悦卡） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-04-12 10:44:43
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CardGrantQuery extends CardGrantEntity implements Query<CardGrantEntity> {

    /** 悦卡发放记录ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 悦卡id查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 悦卡名称查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateTitle")
	private Condition<String> cardTemplateTitleCondition;

    /** 企业ID查询条件 */
	@JsonUnwrapped(prefix = "companyId")
	private Condition<String> companyIdCondition;

    /** 企业名称查询条件 */
	@JsonUnwrapped(prefix = "companyName")
	private Condition<String> companyNameCondition;

    /** 发放人数查询条件 */
	@JsonUnwrapped(prefix = "totalNum")
	private Condition<Integer> totalNumCondition;

    /** 发放总额查询条件 */
	@JsonUnwrapped(prefix = "totalAmount")
	private Condition<BigDecimal> totalAmountCondition;

    /** 备注查询条件 */
	@JsonUnwrapped(prefix = "remarks")
	private Condition<String> remarksCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 审核人查询条件 */
	@JsonUnwrapped(prefix = "checkBy")
	private Condition<String> checkByCondition;

    /** 审核时间查询条件 */
	@JsonUnwrapped(prefix = "checkTime")
	private Condition<LocalDateTime> checkTimeCondition;

    /** [枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件 */
	@JsonUnwrapped(prefix = "checkStatus")
	private Condition<CardGrantCheckStatus> checkStatusCondition;

    /** 审核说明查询条件 */
	@JsonUnwrapped(prefix = "checkRemark")
	private Condition<String> checkRemarkCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CardGrantQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CardGrantQuery(CardGrantEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CardGrantQuery(CardGrantQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.cardTemplateTitleCondition != null) {
			this.cardTemplateTitleCondition = other.cardTemplateTitleCondition.copy();
		}
		if(other.companyIdCondition != null) {
			this.companyIdCondition = other.companyIdCondition.copy();
		}
		if(other.companyNameCondition != null) {
			this.companyNameCondition = other.companyNameCondition.copy();
		}
		if(other.totalNumCondition != null) {
			this.totalNumCondition = other.totalNumCondition.copy();
		}
		if(other.totalAmountCondition != null) {
			this.totalAmountCondition = other.totalAmountCondition.copy();
		}
		if(other.remarksCondition != null) {
			this.remarksCondition = other.remarksCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.checkByCondition != null) {
			this.checkByCondition = other.checkByCondition.copy();
		}
		if(other.checkTimeCondition != null) {
			this.checkTimeCondition = other.checkTimeCondition.copy();
		}
		if(other.checkStatusCondition != null) {
			this.checkStatusCondition = other.checkStatusCondition.copy();
		}
		if(other.checkRemarkCondition != null) {
			this.checkRemarkCondition = other.checkRemarkCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CardGrantEntity> toQueryWrapper() {
		QueryWrapper<CardGrantEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (cardTemplateTitleCondition != null) {
			cardTemplateTitleCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_TITLE);
		}
		if (companyIdCondition != null) {
			companyIdCondition.toWrapper(wrapper, COL_COMPANY_ID);
		}
		if (companyNameCondition != null) {
			companyNameCondition.toWrapper(wrapper, COL_COMPANY_NAME);
		}
		if (totalNumCondition != null) {
			totalNumCondition.toWrapper(wrapper, COL_TOTAL_NUM);
		}
		if (totalAmountCondition != null) {
			totalAmountCondition.toWrapper(wrapper, COL_TOTAL_AMOUNT);
		}
		if (remarksCondition != null) {
			remarksCondition.toWrapper(wrapper, COL_REMARKS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (checkByCondition != null) {
			checkByCondition.toWrapper(wrapper, COL_CHECK_BY);
		}
		if (checkTimeCondition != null) {
			checkTimeCondition.toWrapper(wrapper, COL_CHECK_TIME);
		}
		if (checkStatusCondition != null) {
			checkStatusCondition.toWrapper(wrapper, COL_CHECK_STATUS);
		}
		if (checkRemarkCondition != null) {
			checkRemarkCondition.toWrapper(wrapper, COL_CHECK_REMARK);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回悦卡发放记录ID查询条件
	 * 
	 * @return idCondition 悦卡发放记录ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取悦卡发放记录ID查询条件
	 * 
	 * @return idCondition 悦卡发放记录ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置悦卡发放记录ID查询条件
	 * 
	 * @param idCondition 悦卡发放记录ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回悦卡id查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡id查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡id查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡id查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡id查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡id查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回悦卡名称查询条件
	 * 
	 * @return cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public Condition<String> cardTemplateTitle() {
		this.cardTemplateTitleCondition = new Condition<>();
		return this.cardTemplateTitleCondition;
	}
	
	/**
	 * 获取悦卡名称查询条件
	 * 
	 * @return cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public Condition<String> getCardTemplateTitleCondition() {
		return cardTemplateTitleCondition;
	}

	/**
	 * 设置悦卡名称查询条件
	 * 
	 * @param cardTemplateTitleCondition 悦卡名称查询条件
	 */
	public void setCardTemplateTitleCondition(Condition<String> cardTemplateTitleCondition) {
		this.cardTemplateTitleCondition = cardTemplateTitleCondition;
	}

	/**
	 * 构造并返回企业ID查询条件
	 * 
	 * @return companyIdCondition 企业ID查询条件
	 */
	public Condition<String> companyId() {
		this.companyIdCondition = new Condition<>();
		return this.companyIdCondition;
	}
	
	/**
	 * 获取企业ID查询条件
	 * 
	 * @return companyIdCondition 企业ID查询条件
	 */
	public Condition<String> getCompanyIdCondition() {
		return companyIdCondition;
	}

	/**
	 * 设置企业ID查询条件
	 * 
	 * @param companyIdCondition 企业ID查询条件
	 */
	public void setCompanyIdCondition(Condition<String> companyIdCondition) {
		this.companyIdCondition = companyIdCondition;
	}

	/**
	 * 构造并返回企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> companyName() {
		this.companyNameCondition = new Condition<>();
		return this.companyNameCondition;
	}
	
	/**
	 * 获取企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> getCompanyNameCondition() {
		return companyNameCondition;
	}

	/**
	 * 设置企业名称查询条件
	 * 
	 * @param companyNameCondition 企业名称查询条件
	 */
	public void setCompanyNameCondition(Condition<String> companyNameCondition) {
		this.companyNameCondition = companyNameCondition;
	}

	/**
	 * 构造并返回发放人数查询条件
	 * 
	 * @return totalNumCondition 发放人数查询条件
	 */
	public Condition<Integer> totalNum() {
		this.totalNumCondition = new Condition<>();
		return this.totalNumCondition;
	}
	
	/**
	 * 获取发放人数查询条件
	 * 
	 * @return totalNumCondition 发放人数查询条件
	 */
	public Condition<Integer> getTotalNumCondition() {
		return totalNumCondition;
	}

	/**
	 * 设置发放人数查询条件
	 * 
	 * @param totalNumCondition 发放人数查询条件
	 */
	public void setTotalNumCondition(Condition<Integer> totalNumCondition) {
		this.totalNumCondition = totalNumCondition;
	}

	/**
	 * 构造并返回发放总额查询条件
	 * 
	 * @return totalAmountCondition 发放总额查询条件
	 */
	public Condition<BigDecimal> totalAmount() {
		this.totalAmountCondition = new Condition<>();
		return this.totalAmountCondition;
	}
	
	/**
	 * 获取发放总额查询条件
	 * 
	 * @return totalAmountCondition 发放总额查询条件
	 */
	public Condition<BigDecimal> getTotalAmountCondition() {
		return totalAmountCondition;
	}

	/**
	 * 设置发放总额查询条件
	 * 
	 * @param totalAmountCondition 发放总额查询条件
	 */
	public void setTotalAmountCondition(Condition<BigDecimal> totalAmountCondition) {
		this.totalAmountCondition = totalAmountCondition;
	}

	/**
	 * 构造并返回备注查询条件
	 * 
	 * @return remarksCondition 备注查询条件
	 */
	public Condition<String> remarks() {
		this.remarksCondition = new Condition<>();
		return this.remarksCondition;
	}
	
	/**
	 * 获取备注查询条件
	 * 
	 * @return remarksCondition 备注查询条件
	 */
	public Condition<String> getRemarksCondition() {
		return remarksCondition;
	}

	/**
	 * 设置备注查询条件
	 * 
	 * @param remarksCondition 备注查询条件
	 */
	public void setRemarksCondition(Condition<String> remarksCondition) {
		this.remarksCondition = remarksCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回审核人查询条件
	 * 
	 * @return checkByCondition 审核人查询条件
	 */
	public Condition<String> checkBy() {
		this.checkByCondition = new Condition<>();
		return this.checkByCondition;
	}
	
	/**
	 * 获取审核人查询条件
	 * 
	 * @return checkByCondition 审核人查询条件
	 */
	public Condition<String> getCheckByCondition() {
		return checkByCondition;
	}

	/**
	 * 设置审核人查询条件
	 * 
	 * @param checkByCondition 审核人查询条件
	 */
	public void setCheckByCondition(Condition<String> checkByCondition) {
		this.checkByCondition = checkByCondition;
	}

	/**
	 * 构造并返回审核时间查询条件
	 * 
	 * @return checkTimeCondition 审核时间查询条件
	 */
	public Condition<LocalDateTime> checkTime() {
		this.checkTimeCondition = new Condition<>();
		return this.checkTimeCondition;
	}
	
	/**
	 * 获取审核时间查询条件
	 * 
	 * @return checkTimeCondition 审核时间查询条件
	 */
	public Condition<LocalDateTime> getCheckTimeCondition() {
		return checkTimeCondition;
	}

	/**
	 * 设置审核时间查询条件
	 * 
	 * @param checkTimeCondition 审核时间查询条件
	 */
	public void setCheckTimeCondition(Condition<LocalDateTime> checkTimeCondition) {
		this.checkTimeCondition = checkTimeCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 * 
	 * @return checkStatusCondition [枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 */
	public Condition<CardGrantCheckStatus> checkStatus() {
		this.checkStatusCondition = new Condition<>();
		return this.checkStatusCondition;
	}
	
	/**
	 * 获取[枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 * 
	 * @return checkStatusCondition [枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 */
	public Condition<CardGrantCheckStatus> getCheckStatusCondition() {
		return checkStatusCondition;
	}

	/**
	 * 设置[枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 * 
	 * @param checkStatusCondition [枚举]状态：0-未审核-UNCHECKED、1-审核通过-PASSED、2-审核不通过-UNPASSED查询条件
	 */
	public void setCheckStatusCondition(Condition<CardGrantCheckStatus> checkStatusCondition) {
		this.checkStatusCondition = checkStatusCondition;
	}

	/**
	 * 构造并返回审核说明查询条件
	 * 
	 * @return checkRemarkCondition 审核说明查询条件
	 */
	public Condition<String> checkRemark() {
		this.checkRemarkCondition = new Condition<>();
		return this.checkRemarkCondition;
	}
	
	/**
	 * 获取审核说明查询条件
	 * 
	 * @return checkRemarkCondition 审核说明查询条件
	 */
	public Condition<String> getCheckRemarkCondition() {
		return checkRemarkCondition;
	}

	/**
	 * 设置审核说明查询条件
	 * 
	 * @param checkRemarkCondition 审核说明查询条件
	 */
	public void setCheckRemarkCondition(Condition<String> checkRemarkCondition) {
		this.checkRemarkCondition = checkRemarkCondition;
	}

}
